Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qa] Test walletpassphrase timeout #7320

Merged
merged 1 commit into from Jan 18, 2016

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Jan 8, 2016

Test case for #7316

Test code: $ git checkout fadceb7;make;BITCOIND=bitcoin-qt qa/pull-tester/rpc-tests.py keypool

...
Running testscript keypool.py ...
Initializing test directory /tmp/testqf3QO4
Assertion failed: 1452255264 != 0

@jonasschnelli
Copy link
Contributor

Nice!
utACK.

But this actually does not test the issue #7316, because the reported issue can only happen when you run bitcoin-qt with -server=1.

@maflcko
Copy link
Member Author

maflcko commented Jan 8, 2016

@jonasschnelli See my "test code" ;)

Are you still working on the BITCOIND=bitcoin-qt nightly rpc tests?

@jonasschnelli
Copy link
Contributor

@MarcoFalke: Ah. Right. Your testcode looks good. Indeed, this would catch #7316.

Are you still working on the BITCOIND=bitcoin-qt nightly rpc tests?

It's relatively far down on my priority list. But not given up...

nodes[0].keypoolrefill(3)
nodes[0].walletlock()
# test walletpassphrase timeout
time.sleep(1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK, but setting a timeout of 1 and then waiting a second is too close. A slight mistiming (e.g. busy machine) would result in a race condition, what about waiting 2 seconds instead?

nodes[0].walletlock()
# test walletpassphrase timeout
time.sleep(1.1)
assert_equal(nodes[0].getwalletinfo()["unlocked_until"], 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this ought to actually try to do something to test the wallet relocking?

@laanwj laanwj merged commit fa1cb1a into bitcoin:master Jan 18, 2016
laanwj added a commit that referenced this pull request Jan 18, 2016
fa1cb1a [qa] Test walletpassphrase timeout (MarcoFalke)
@maflcko maflcko deleted the Mf1601-rpcWalletPass branch January 18, 2016 10:21
luke-jr pushed a commit to luke-jr/bitcoin that referenced this pull request Feb 12, 2016
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Apr 5, 2016
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants